"""The application's Globals object"""
from pylons import config
from pyleo.model.filesystem import *

class Globals(object):
    """Globals acts as a container for objects available throughout the
    life of the application
    """

    def __init__(self):
        """One instance of Globals is created during application
        initialization and is available during requests via the 'g'
        variable
        """
        # The most important global we have is the Leonardo File System, which we
        # may want at any point ...
        
        # Data
        self.lfsroot=config['app_conf']['lfsroot']
        self.lfs=LeonardoFileSystem(self.lfsroot)
        
        # Configure Website
        self.site_title=config['app_conf']['site_title']
        self.site_url=config['app_conf']['site_url']
        self.home_href=config['app_conf']['home_href']
        self.site_sub_title=config['app_conf']['site_sub_title']
        self.footer_text=config['app_conf']['footer_text']
        
        self.proxy_server=config['app_conf']['proxy_server']
        self.ping_targets=config['app_conf']['ping_targets']
        
        # Configure blog
        self.blog_path=config['app_conf']['blog_path']
        self.blog_title=config['app_conf']['blog_title']
        self.blog_recent_count=config['app_conf']['blog_recent_count']
        self.math_prompt=config['app_conf']['math_prompt']
        self.notify=config['app_conf']['notify']
        self.SMTPserver=config['app_conf']['SMTPserver']
        self.authorEmail=config['app_conf']['authorEmail']

        #
        self.default_content=config['app_conf']['default_content']
        self.draft_prefix=config['app_conf']['draft_prefix']

        
